<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>找回密码</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../../css/mui.min.css" rel="stylesheet" />
		<link href="../../css/login.css" rel="stylesheet" />
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		    <h1 class="mui-title">重置密码</h1>
		</header>
		<div class="mui-content">
		    <form>
		    	<div class="mui-input-group">
		    		<div class="mui-input-row">      
					    <input type="password" class="mui-input-password" placeholder="请输入新密码" id="newPwd">
					</div>
					<div class="mui-input-row">
						<input type="password" class="mui-input-password" placeholder="重新输入新密码" id="newPwdAgain" />
					</div>
		    		
		    	</div>
		    	<span id="tishi">请输入6位以上的密码</span>
		    	<button id="changeBtn" class="mui-btn mui-btn-primary">确认修改</button>
		    </form>
		</div>
		<script src="../../js/mui.min.js"></script>
		<script type="text/javascript">
			function getById(id){
				return document.getElementById(id)
			}
			mui.init()
//			mui.plusReady(function(){
//				
//			})

			//
			//两次密码验证函数
			//
			var newPwd=getById('newPwd'),newPwdAgain=getById('newPwdAgain');
			var changeBtn=getById('changeBtn');
			function newPwdClear(){
				newPwd.value='';
				newPwdAgain.value=''
			}
			changeBtn.addEventListener('tap',function(){
				
				if(!newPwd.value){
					mui.alert('请输入新密码!')
				}else if(newPwd.value.length<6){
					mui.alert('新密码输入格式错误！')
				}else if(!newPwdAgain.value){
					mui.alert('请重复输入新密码！')
				}else if(newPwd.value!=newPwdAgain.value){
					mui.alert('两次输入密码不一致！')
					newPwdClear();
					
				}else{
					mui.alert('修改成功！')
					newPwdClear();
				}
			})
		</script>
	</body>

</html>